export default {
  fields: {
    name: {
      model: "name",
      type: "input",
      wrapper: {
        label: "账号名称"
      },
      customize: {
        allowClear: true,
        placeholder: "请输入账号名称"
      },
      decorator: {
        initialValue: undefined,
        rules: [{ required: true, message: "必填项" }]
      },
      extend: {}
    },
    money: {
      model: "money",
      type: "number",
      wrapper: {
        label: "账户余额"
      },
      customize: {
        allowClear: true,
        placeholder: "请输入账户余额"
      },
      decorator: {
        initialValue: undefined,
        rules: [{ required: false, message: "必填项" }]
      },
      extend: {}
    },
    type: {
      model: "type",
      type: "select",
      wrapper: {
        label: "账户类型"
      },
      customize: {
        allowClear: true,
        placeholder: "请选择账户类型",
        options: [
          { value: 1, label: "支付宝" },
          { value: 2, label: "微信" },
          { value: 3, label: "银行" }
        ]
      },
      decorator: {
        initialValue: undefined,
        rules: [{ required: true, message: "必填项" }]
      },
      extend: {}
    },
    zfbPid: {
      model: "zfbPid",
      type: "input",
      wrapper: {
        label: "支付宝的pid"
      },
      customize: {
        allowClear: true,
        placeholder: "请输入支付宝的pid"
      },
      decorator: {
        initialValue: undefined,
        rules: [{ required: false, message: "必填项" }]
      },
      extend: {}
    },
    subMchid: {
      model: "subMchid",
      type: "input",
      wrapper: {
        label: "微信特约商户号"
      },
      customize: {
        allowClear: true,
        placeholder: "请输入微信特约商户号"
      },
      decorator: {
        initialValue: undefined,
        rules: [{ required: false, message: "必填项" }]
      },
      extend: {}
    },
    bankAccountId: {
      model: "bankAccountId",
      type: "input",
      wrapper: {
        label: "银行账户"
      },
      customize: {
        allowClear: true,
        placeholder: "请输入银行账户"
      },
      decorator: {
        initialValue: undefined,
        rules: [{ required: false, message: "必填项" }]
      },
      extend: {}
    }
  },
  validators: {},
  config: {
    search: {
      fieldKeys: ["name", "type"],
      customize: {
        layout: "inline",
        labelCol: {
          span: 8
        },
        wrapperCol: {
          span: 16
        }
      }
    },
    create: {
      fieldKeys: ["name", "money", "type", "zfbPid", "subMchid", "bankAccountId"],
      customize: {
        labelCol: {
          span: 4
        },
        wrapperCol: {
          span: 20
        }
      }
    },
    update: {
      fieldKeys: ["name", "money", "type", "zfbPid", "subMchid", "bankAccountId"],
      customize: {
        labelCol: {
          span: 4
        },
        wrapperCol: {
          span: 20
        }
      }
    },
    table: {
      fields: [
        { model: "name", title: "账号名称" },
        { model: "money", title: "账户余额" },
        { model: "type", title: "账户类型" },
        { model: "zfbPid", title: "支付宝的pid" },
        { model: "subMchid", title: "微信特约商户号" },
        { model: "bankAccountId", title: "银行账户" }
      ],
      customize: {
        rowKey: "id"
      },
      extend: {
        batch: true,
        action: {
          width: 180
        }
      }
    }
  }
};
